import request from '@/utils/request'

// ---------- 笔记分类 ---------- //
// 获取-笔记分类  GET: /my/cate/list
export const noteCateListService = () => {
  return request.get('/my/cate/list')
}
// 获取-笔记分类详情  GET: /my/cate/info
export const noteCateInfoService = (params) => {
  return request.get('/my/cate/info', { params })
}
// 更新-笔记分类详情  PUT: /my/cate/info
export const noteCateUpdateInfoService = (data) => {
  return request.put('/my/cate/info', data)
}
// 增加-笔记分类  POST: /my/cate/add
export const noteCateAddService = (data) => {
  return request.post('/my/cate/add', data)
}
// 删除-笔记分类  DELETE: /my/cate/del
export const noteCateDeleteService = (params) => {
  return request.delete('/my/cate/del', { params })
}

// ---------- 笔记列表 ---------- //
// 获取-笔记列表  GET: /my/article/list
export const noteListService = (params) => {
  return request.get('/my/article/list', { params })
}
// 获取-笔记详情  GET: /my/article/info
export const noteInfoService = (params) => {
  return request.get('/my/article/info', { params })
}
// 更新-笔记详情  PUT: /my/article/info
export const noteUpdateInfoService = (data) => {
  return request.put('/my/article/info', data)
}
// 发布-笔记  POST: /my/article/add
export const noteAddService = (data) => {
  return request.post('/my/article/add', data)
}
// 删除-笔记  DELETE: /my/article/info
export const noteDeleteService = (params) => {
  return request.delete('/my/article/info', { params })
}
